</div>
</div>
</div>
<script src="{$static_dir}/assets/js/iscroll.js"></script>
<script src="{$static_dir}/assets/js/amazeui.min.js"></script>
<script src="{$static_dir}/assets/js/amazeui.datatables.min.js"></script>
<!--<script src="{$static_dir}/assets/js/layer/layer.js"></script>-->
<script src="{$static_dir}/assets/js/dataTables.responsive.min.js"></script>
<script src="{$static_dir}/assets/js/app.js"></script>
<script src="{$static_dir}/assets/js/common.js"></script>
<script src="{$static_dir}/assets/js/new_pages.js"></script>
<script>
	layui.use(['layer','laydate','table'], function(){ 
 	 var $ = layui.jquery, layer = layui.layer; 
 	  var laydate = layui.laydate;
 	  var myScroll;
 	  $(function() {
		console.log('unit')
		if($('#map').data('map')) {
			$('#unit_main').css('overflow','auto')
		} else {
			if($('.main-w').data('scroll')){}else{
				myScroll = new IScroll('#unit_main', {
					mouseWheel: true,
					disableMouse: true,
	    			disablePointer: true,
	    			scrollbars: 'custom',
	    			interactiveScrollbars:true,
				});
			}
		}
		//点击添加图片
		$('input[type="file"]').on('change',function(){
			console.log('change')
			if($(this).data('type')=='img'){
				var fil=$(this)[0].files[0];
				console.log(fil)
				var that=this;
				var reader = new FileReader();
				reader.onload = function(evt) {
					console.log('fileimg')
					$(that).closest('.file-w').find('.fileimg').attr('src',evt.target.result)
				}
				reader.readAsDataURL(fil);
			}
		});
		//更新缓存
		$('button[data-cache]').on('click', function() {
			var that = this
			$.ajax({
				type: 'post',
				url: "index/cache",
				data: {
					cache: $(that).data('cache')
				},
				success: function(res) {
					rslt(res)
				}
			})
		});
		$('.close-input').on('click', function() {
			for(var i = 0; i < $(this).parent().find('input').length; i++) {
				$(this).parent().find('input').eq(i).val('')
			}

		});
		$('img').on('click', function() {
			if($(this).data('magnify')) {
				layer.open({
					type: 1,
					title: false,
					skin: 'layui-layer-rim', //加上边框
					area: ['500px', '500px'], //宽高
					content: `<img style="width: 100%;height:100%;" src="${$(this).attr('src')}" />`
				});
			}
		});
	
	{include file="$JSFILE"}
	{if $menu_current}
	$(".sidebar-nav [data-url^='{$menu_current}']").parents('li:first').find('a:first').addClass('active').parents('ul:not(".topest")').css('display', 'block').find('.sidebar-nav-sub-ico:first').addClass('sidebar-nav-sub-ico-rotate');
	{/if}

	})
	})
</script>
</body>

</html>